<!DOCTYPE html>
<html>
<head>
    <title>Boolean Example 1</title>
    <script type="text/javascript">
          
        var message = "Hello world!";
        var messageAsBoolean = Boolean(message);
        
        alert(messageAsBoolean); //true
 
              
    </script>

</head>
<body>
  
</body>
</html>